<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:tns="http://www.companyA.org/salary" version="1.0">
	
	<xsl:output method="xml"/>
	
	<xsl:template match="/">
		<response>	
		<xsl:apply-templates 
		    select="tns:response/tns:persons/tns:responsePerson" />
		</response>
	</xsl:template>

	<!-- for each person we write out a comma seperated field -->
	<xsl:template match="tns:responsePerson">
		<xsl:value-of select="concat(tns:firstName,',')"/>
		<xsl:value-of select="concat(tns:lastName,',')"/>
		<xsl:value-of select="concat(*/@total,',')"/>
		<xsl:value-of select="tns:status"/>
		<!-- add a linebreak -->
		<xsl:text>&#10;</xsl:text>
	</xsl:template>
</xsl:stylesheet>